<script setup lang="ts">
import {ref} from "vue";
import {NButton} from 'naive-ui';
defineProps(['title']);//定义一个属性，该属性在组件引用时传递进来

const count = ref(0);
</script>

<template>
  <p>{{ title}}</p>
  <NButton @click="count++">点击计数：{{ count }}</NButton>
</template>

<style scoped>

</style>